package com.niiwoo.civet.account.service.local;

import com.niiwoo.civet.account.dto.AccountAsyncChangeExtDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by bincun on 2017/11/7.
 * 处理账户余额service
 */
@Service
@Slf4j
public class AccountBalanceLocalAsyncService {
    @Autowired
    private AccountBalanceLocalService accountAsyncChangeLocal;
    /**
     * 用户账户金额更新
     * 数据插入事物提交后，异步调用该方法更新账户余额
     * 暂时不用
     *
     * @param acAccountAsyncChanges
     */
    @Transactional
    public void accountAsyncChangeLocal(List<AccountAsyncChangeExtDTO> acAccountAsyncChanges) {
        //System.out.println("=========" + System.currentTimeMillis());
//        log.info("-----------AccountBalanceLocalAsyncService-accountAsyncChangeLocal----------{}",acAccountAsyncChanges.size());
//
//        for (AccountAsyncChangeExtDTO acAccountAsyncChange : acAccountAsyncChanges) {
//            accountAsyncChangeLocal.accountAsyncChange(acAccountAsyncChange);
//        }
    }

}
